﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LED_Tester
{
    public partial class frmBSDFwavelength_1 : Form
    {

        public double Wavelength1;
        public double Wavelength2;
        public double Wavelength3;
        public double Wavelength4;

        public frmBSDFwavelength_1()
        {
            InitializeComponent();
        }

        private void frmBSDFwavelength_1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (double.Parse(textBox1.Text) < 380 || double.Parse(textBox1.Text) > 830 || 
                double.Parse(textBox1.Text) < 380 || double.Parse(textBox2.Text) > 830 || 
                double.Parse(textBox1.Text) > double.Parse(textBox2.Text) ||
                double.Parse(textBox3.Text) < 380 || double.Parse(textBox3.Text) > 830 ||
                double.Parse(textBox4.Text) < 380 || double.Parse(textBox4.Text) > 830 ||
                double.Parse(textBox3.Text) > double.Parse(textBox4.Text) 
                )
            {
                MessageBox.Show("请输入正确数值！", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            try
            {
                Wavelength1 = double.Parse(textBox1.Text);
                Wavelength2 = double.Parse(textBox2.Text); 
                Wavelength3 = double.Parse(textBox3.Text);
                Wavelength4 = double.Parse(textBox4.Text);
                this.Close();
            }
            catch
            {
                MessageBox.Show("请输入正确数值！", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }


    }
}
